package org.springcloud.wisdom.springcloud_03_freshman.admin.dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springcloud.wisdom.springcloud_03_freshman.student.entity.Card;

import java.util.List;

@Mapper
public interface AdminCardDao {
    /**
     * 以分页的形式查看 打卡的人数
     * @param start
     * @param size
     * @return
     */
    @Select("select * from card limit #{start},#{size}")
    public List<Card> getAll(int start,int size);
    @Select("select count(*) from card")
    public int countCards();

    /**
     * 根据sid删除某人的打卡记录
     * @param sid
     * @return
     */
    @Delete("delete  from  card where sid=#{sid}")
    public int deleteBySid(String sid);

}
